import { getCateListAPI } from '@/api/cate'
export default {
  namespaced: true,
  state() {
    return {
      cateList: []
    }
  },
  mutations: {
    getCateList(state, val) {
      state.cateList = val
    }
  },
  actions: {
    async useGet(state) {
      const { data: res } = await getCateListAPI()
      if (res.code === 0) {
        state.commit('getCateList', res.data)
      }
    }
  }
}
